﻿using System;
using System.Linq;
using InvestmentIntelligence.DbModel.Models;

namespace InvestmentIntelligence.Data.Repository.EFImplementation
{
    public class ExcessTimeSeriesRepository : IIPRepository<ExcessTimeSerie>, IExcessTimeSeriesRepository
    {
      

        public DateTime? GetMaxDate(int securityId, int benchmarkId)
        {
            return Get(v => v.Where(c => c.SecurityId == securityId && c.BenchmarkId == benchmarkId).Max(c => (DateTime?)c.Date));
        }
    }
}